<%@ Control Language="C#" Inherits="PlexBB.Controls.Admin.Overall" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="admin.css" rel="stylesheet" type="text/css" media="screen" />

    <script type="text/javascript">
// <![CDATA[
//var jump_page = '{LA_JUMP_PAGE}:';
//var on_page = '{ON_PAGE}';
//var per_page = '{PER_PAGE}';
//var base_url = '{A_BASE_URL}';

var menu_state = 'shown';

/**
* Jump to page
*/
function jumpto()
{
	var page = prompt(jump_page, on_page);

	if (page !== null && !isNaN(page) && page > 0)	
	{
		document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
	}
}

/**
* Set display of page element
* s[-1,0,1] = hide,toggle display,show
*/
function dE(n, s, type)
{
	if (!type)
	{
		type = 'block';
	}

	var e = document.getElementById(n);
	if (!s)
	{
		s = (e.style.display == '') ? -1 : 1;
	}
	e.style.display = (s == 1) ? type : 'none';
}

/**
* Mark/unmark checkboxes
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Window popup
*/
function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
	return false;
}

/**
* Hiding/Showing the side menu
*/
function switch_menu(handle)
{
	var menu = document.getElementById('menu');
	var main = document.getElementById('main');
	var toggle = document.getElementById('toggle');
	
	var isRtl = document.forms[0].dir == 'rtl';

	switch (menu_state)
	{
		// hide
		case 'shown':
			main.style.width = '93%';
			menu_state = 'hidden';
			menu.style.display = 'none';
			toggle.style.width = '20px';
            handle.style.backgroundPosition = isRtl ? '0% 50%' : '100% 50%';
			toggle.style.left = isRtl ? '96%' : '0';

		break;

		// show
		case 'hidden':
			main.style.width = '76%';
			menu_state = 'shown';
			menu.style.display = 'block';
			toggle.style.width = '5%';
			handle.style.backgroundPosition = isRtl ? '100% 50%' : '0% 50%';
			toggle.style.left = isRtl ? '75%' : '15%';
		break;
	}
}

// ]]>
    </script>

</head>
<body>
    <form runat="server" id="pageForm">
    <div id="wrap">
        <div id="page-header">
            <h1>
                <asp:Literal runat="server" Text="<%$ Lang:ADMIN_PANEL%>" /></h1>
            <p>
                <asp:HyperLink runat="server" ID="hlAdmIndex" Text="<%$ Lang:ADMIN_INDEX%>" />
                &bull;
                <asp:HyperLink runat="server" ID="hlForumIndex" Text="<%$ Lang:FORUM_INDEX%>" /></p>
            <p id="skip">
                <asp:HyperLink runat="server" NavigateUrl="#acp" Text="<%$ Lang:SKIP%>" /></p>
        </div>
        <div id="page-body">
            <div id="tabs">
                <ul>
                    <asp:Repeater runat="server" ID="rTabs">
                        <ItemTemplate>
                            <li runat="server" id="cTab">
                                <asp:HyperLink runat="server" ID="hlLink">
                                    <span>
                                        <asp:Literal runat="server" ID="lName" /></span>
                                </asp:HyperLink>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                </ul>
            </div>
            <div id="acp">
                <div class="panel">
                    <span class="corners-top"><span></span></span>
                    <div id="content">
                        <asp:PlaceHolder runat="server">
                            <%--Visible="<%#!Defined(S_USER_NOTICE)%>"--%>
                            <div id="toggle">
                                <a runat="server" class="toggle-handle" accesskey="m" title="<%$ Lang:MENU_TOGGLE%>"
                                    onclick="switch_menu(this); return false;" href="#"></a>
                            </div>
                        </asp:PlaceHolder>
                        <div id="menu">
                            <p>
                                <asp:Literal runat="server" Text="<%$ Lang:LOGGED_IN_AS%>" /><br />
                                <strong>
                                    <asp:Literal runat="server" ID="tUserName" /></strong> [&nbsp;<asp:LinkButton runat="server"
                                        ID="bLogout" Text="<%$ Lang:LOGOUT%>" />&nbsp;]</p>
                            <ul>
                                <asp:Repeater runat="server" ID="rCategories">
                                    <ItemTemplate>
                                        <li class="header">
                                            <asp:Literal runat="server" ID="lTitle" /></li>
                                        <asp:Repeater runat="server" ID="rItems">
                                            <ItemTemplate>
                                                <li runat="server" id="cItem">
                                                    <asp:HyperLink runat="server" ID="hlLink">
                                                        <asp:Label runat="server" ID="lName" /></asp:HyperLink>
                                                </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                        <div id="main">
                            <asp:Panel runat="server" ID="pContent" />
                        </div>
                    </div>
                    <span class="corners-bottom"><span></span></span>
                </div>
            </div>
        </div>
        <div id="page-footer">
            Powered by plexBB &copy; 2008 <a href="http://www.plexbb.com/">plexBB Team</a>
            <asp:Literal runat="server" Text="<%$ Lang:TRANSLATION_INFO*:<br/>{0}%>" />
        </div>
    </div>
    </form>
</body>
</html>
